//无数据情况处理，传入空字符串
const judgeIsNull = function (val) {
  const target = typeof val === 'object' ? Object.prototype.toString.call(val) : `${val}`;
  if (/null|undefined|nan|^\s*$/i.test(target)) {
    return '--';
  }
  return val;
};

export default { judgeIsNull };
